package cn.dglydrpy.study.ssm.common.rabbitmq.xml;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class RabbitXMLListenerConsumer implements ChannelAwareMessageListener {

    @Override
    public void onMessage(Message message, Channel channel) throws Exception {
        System.out.println("RabbitXMLListenerConsumer接收到消息： " + new String(message.getBody(), message.getMessageProperties().getContentEncoding()));
    }
}

//public class RabbitXMLListenerConsumer implements MessageListener {
//
//    @Override
//    public void onMessage(Message message) {
//
//    }
//}
